/**
 * 導師信息服務
 */

import { BaseApiService } from '../utils/api';
import {
  MentorAddDto,
  MentorAddVo,
} from '../types/api';

export class MentorService extends BaseApiService {
  
  /**
   * 添加導師信息
   */
  async addMentor(data: MentorAddDto): Promise<MentorAddVo> {
    return this.handleResponse(
      this.http.post<MentorAddVo>('/api/mentor/add', data)
    );
  }

  /**
   * 檢查用戶是否已經是導師
   */
  async checkMentorStatus(): Promise<boolean> {
    return this.handleResponse(
      this.http.get<boolean>('/api/mentor/checkStatus')
    );
  }
}

// 導出單例實例
export const mentorService = new MentorService();
